﻿<UserControl x:Class="DIST.LR.ZHJG.Controls.Chart.ucVFLinearGauge"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vg="clr-namespace:Visifire.Gauges;assembly=SLVisifire.Gauges"
    mc:Ignorable="d"
    d:DesignHeight="70" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="Transparent">

        <vg:Gauge Name="VFLinearGauge" Type="Linear" Width="400" Height="70" Background="Transparent" OuterBackground="Transparent" CornerRadius="15" OuterCornerRadius="3">   
            <vg:Gauge.LinearScales>
                <vg:LinearScale Name="Scale1" Interval="30" ScaleThickness="0.3" Minimum="{Binding Minmum1}" Maximum="{Binding Maxmum1}" BorderThickness="0" BorderBrush="Red" Orientation="Horizontal" Position="0,0.28" StartMargin="0.05" EndMargin="0.05" ShadowEnabled="false">
                    <vg:LinearScale.MajorTicks>
                        <vg:MajorTicks TickWidth="0.03" TickLength="0.8" Placement="Center" Background="Black"/>
                    </vg:LinearScale.MajorTicks>
                    <vg:LinearScale.MinorTicks>
                        <vg:MinorTicks TickWidth="0.02" TickLength="0.35" Placement="Center" Background="Black"/>
                    </vg:LinearScale.MinorTicks>
                    <vg:LinearScale.ScaleLabels>
                        <vg:ScaleLabels Placement="Outside" FontColor="Black"/>
                    </vg:LinearScale.ScaleLabels>
                </vg:LinearScale>

                <vg:LinearScale Name="Scale2" Interval="20"  ScaleThickness="0.3" Minimum="{Binding Minmum2}" Maximum="{Binding Maxmum2}" BorderThickness="0" BorderBrush="Black" Orientation="Horizontal" Position="0,0.58" StartMargin="0.05" EndMargin="0.05" ShadowEnabled="false">
                    <vg:LinearScale.MajorTicks>
                        <vg:MajorTicks TickWidth="0" TickLength="0" Placement="Center" Background="White"/>
                    </vg:LinearScale.MajorTicks>
                    <vg:LinearScale.MinorTicks>
                        <vg:MinorTicks TickWidth="0" TickLength="0" Placement="Center" Background="White"/>
                    </vg:LinearScale.MinorTicks>
                    <vg:LinearScale.ScaleLabels>
                        <vg:ScaleLabels Placement="Inside" FontColor="Black"/>
                    </vg:LinearScale.ScaleLabels>
                </vg:LinearScale>                
            </vg:Gauge.LinearScales>
            
            <vg:Gauge.Indicators>
                <vg:BarIndicator ScaleName="Scale1" BorderThickness="0" ShadowEnabled="False" Canvas.ZIndex="0">
                </vg:BarIndicator>
                <vg:BarIndicator ScaleName="Scale2" BorderThickness="0" ShadowEnabled="False"  Canvas.ZIndex="0">
                </vg:BarIndicator>
            </vg:Gauge.Indicators>
            
            <vg:Gauge.Ranges>
                <vg:Range ScaleName="Scale1"  StartValue="0" EndValue="{Binding Value1}" Background="#5FA449" StartWidth="0.1" EndWidth="0.1" Placement="Center" DistanceFromScale="0.05" ShadowEnabled="False" >
                </vg:Range>
                <vg:Range ScaleName="Scale1"  StartValue="{Binding Value1}" EndValue="{Binding Maxmum1}" Background="#E8BE2A" StartWidth="0.1" EndWidth="0.1" Placement="Center" DistanceFromScale="0.05" ShadowEnabled="False">
                </vg:Range>
                <vg:Range ScaleName="Scale2"  StartValue="0" EndValue="{Binding Value2}" Background="#6D7CB3" StartWidth="0.1" EndWidth="0.1" Placement="Center" DistanceFromScale="0.05" ShadowEnabled="False">
                </vg:Range>
                <vg:Range ScaleName="Scale2"  StartValue="{Binding Value2}" EndValue="{Binding Maxmum2}" Background="Yellow" StartWidth="0.1" EndWidth="0.1" Placement="Center" DistanceFromScale="0.05" ShadowEnabled="False">
                </vg:Range>
            </vg:Gauge.Ranges>
            
                       
        </vg:Gauge>
    </Grid>
</UserControl>
